package com.hujun.common.util.validatecode;

import java.io.IOException;
import java.io.OutputStream;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ValidateCodeUtil {
	public static final Logger log = LoggerFactory.getLogger(ValidateCodeUtil.class);
	
	public static String createValidateCode(OutputStream sos){
		ValidateCode vc = new ValidateCode();
		try {
			vc.write(sos);
		} catch (IOException e) {
			log.error("createValiDateCode error!");
			return null;
		}
		return vc.getCode();
	}
}
